\title{Some Notes of the First 3 Regimes}
\author{Xinya Zhang}
\date{\today}

\documentclass[12pt]{article}
\renewcommand{\baselinestretch}{1.62}
\usepackage{graphicx}
\usepackage{rotating}
\usepackage{amsmath}
\usepackage[psamsfonts]{amssymb}
\usepackage{pifont}
\usepackage{enumerate}
\usepackage{theorem}
\begin{document}
\maketitle
\section{Hamiltonian System}
For the easy-read purpose, I copy all the first order equations and differential equations of co-state variables here, and I will use the equation numbers listed below from now on:
\begin{eqnarray}
\frac{\partial \mathcal{H}}{\partial c} &=& c^{-\gamma} -\lambda = 0 
\label{eq:FOCc}  \\
\frac{\partial \mathcal{H}}{\partial i} &=& -\lambda + q = 0 \label{eq:FOCi}\\ 
\frac{\partial \mathcal{H}}{\partial j} &=& -\lambda + \eta + \mu = 0; \mu j=0, \mu\ge 0, j \ge 0 \label{eq:FOCj}\\ 
\frac{\partial \mathcal{H}}{\partial n} &=& -\lambda +\nu+\omega = 0, \omega n=0, \omega\ge 0, n\ge 0  \label{eq:FOCn}\\ 
\frac{\partial \mathcal{H}}{\partial R} &=& -\lambda g(S,N)+\epsilon+\sigma Q+\xi = 0, \xi R=0, \xi\ge 0, R\ge 0 \label{eq:FOCR} \\
\frac{\partial \mathcal{H}}{\partial B} &=& -\lambda \bigl (\Gamma_0+(\Gamma_1+H)^{-\alpha}\bigr )+\epsilon+\eta\psi+\zeta=0, \zeta B=0, \zeta\ge 0, B\ge 0 \label{eq:FOCB}
\end{eqnarray}
The differential equations:
\begin{eqnarray}
\dot{q} &=& \beta q-\frac{\partial \mathcal{H}}{\partial k} = (\beta+\delta) q - \lambda A+\epsilon A \label{eq:qdot}\\
\dot{\eta} &=& \beta \eta- \frac{\partial \mathcal{H}}{\partial H} =\beta\eta - \lambda\alpha (\Gamma_1+H)^{-\alpha-1}B \label{eq:etadot} \\
\dot{\sigma} &=& \beta \sigma - \frac{\partial \mathcal{H}}{\partial S} = \beta \sigma +\lambda \frac{\partial g}{\partial S}R  \label{eq:sigmadot} \\
\dot{\nu} &=& \beta \nu - \frac{\partial \mathcal{H}}{\partial N} = \beta\nu +\lambda \frac{\partial g}{\partial N}R  \label{eq:nudot}
\end{eqnarray}

I also put the budget constraint and the other useful equations here:
\begin{eqnarray}
 y &=& c+i+j+n+g(S,N)R+pB \label{eq:Budget} \\
 p &=& \Gamma_0+(\Gamma_1+H)^{-\alpha} \label{eq:RenewCost} \\
\dot{k} &=& i-\delta{k} \label{eq:kdot} \\ 
\dot{H} &=& j+\psi B \label{eq:Hdot}\\
\dot{N} &=& n \label{eq:Ndot}\\
\dot{S} &=& QR \label{eq:Sdot}\\
y &=& Ak \label{eq:prod}
\end{eqnarray}




\section {Regime 1: $[0,T_1]$}
in the Regime $[0,T_1]$, $R>0$, $n>0$, $B=0$, and $j=0$. Since $R>0$, we have $\xi$=0, and then, from FOC condition(5),we get:
\begin{equation}
\epsilon=\lambda g(S,N)-\sigma Q \label{eq:epsilon1}
\end{equation}
Since $n>0$, we know $\omega=0$. According to FOC condition (2) and (4), we find $\lambda=q=\nu$, and hence $\dot{\lambda}=\dot{q}=\dot{\nu}$. From equation (7), (10) and (\ref{eq:epsilon1}),we have:
\begin{equation}
[\delta+g(S,N)A-\frac{\partial g}{\partial N}R-A]\lambda = \sigma QA
\label{eq:qdoteqnudot}
\end{equation}

Since $R=Ak$ here, we can rewrite (\ref{eq:qdoteqnudot}) to get $k$ as an expression of $S$, $N$, $\lambda$, and $\sigma$:
\begin{equation}
k=\frac{[\delta+g(S,N)A-A]\lambda-\sigma QA}{\frac{\partial g}{\partial N}A\lambda}
\label{eq:k1}
\end{equation}


From $\dot{\lambda}=\dot{q}=\dot{\nu}$, and equation (10), we obtain the differential equation of $\lambda$:
\begin{equation}
\dot{\lambda} = \lambda(\beta+\frac{\partial g}{\partial N}Ak) \label{eq:q_nu_lambda}
\end{equation}

Differentiate (\ref{eq:qdoteqnudot}) on both sides with time $t$, we have the equations below step by step:
\begin{eqnarray}
(\ref{eq:qdoteqnudot})\Rightarrow\left[
	A\left(\frac{\partial g}{\partial S}\dot{S}+\frac{\partial g}{\partial N}\dot{N}\right)-
	\left(\frac{\partial^2g}{\partial S\partial N}\dot{S}+\frac{\partial^2g}{\partial N^2}\dot{N}\right)Ak-
	\frac{\partial g}{\partial N}A\dot{k}
\right]
\lambda \nonumber\\
+\frac{\sigma QA}{\lambda}\dot{\lambda} = \dot{\sigma}QA+\sigma\dot{Q}A \nonumber
\end{eqnarray}
\begin{eqnarray}
\Rightarrow[A(\frac{\partial g}{\partial S}QAk+\frac{\partial g}{\partial N}n)-(\frac{\partial^2g}{\partial S\partial N}QAk+\frac{\partial^2g}{\partial N^2}n)Ak-\frac{\partial g}{\partial N}A(i-\delta k)]\lambda \nonumber\\
+\sigma QA(\beta+\frac{\partial g}{\partial N}Ak) = (\beta\sigma+\lambda\frac{\partial g}{\partial S}Ak)QA+\sigma\pi QA  \nonumber
\end{eqnarray}
After simplifying, we get the final equation:
\begin{equation}
\lambda\biggr [\frac{\partial g}{\partial N}(n+\delta k+\sigma QAk-i)-\frac{\partial^2g}{\partial S\partial N}QAk^{2}-\frac{\partial^2g}{\partial N^2}nk\biggr ]=\sigma\pi Q  \label{eq:diff1}
\end{equation}

Given FOC condition (1) and production function (16), budget constraint (11) implys:
\begin{equation}
i=Ak[1-g(S,N)]-\lambda^{-1/\gamma}-n
\label{eq:i_foss}
\end{equation}

Substituting (\ref{eq:i_foss}) and (\ref{eq:k1}) into (\ref{eq:diff1}), we then botain an equation to be solved for n:
\begin{eqnarray}
n\lambda(\frac{\partial^2g}{\partial N^2}k-2\frac{\partial g}{\partial N})=\lambda k[\frac{\partial g}{\partial N}(\delta+g(S,N)A-A+\sigma QA)-\frac{\partial^2g}{\partial S\partial N}QAk]  \nonumber\\ 
+\lambda^{1-1/\gamma}\frac{\partial g}{\partial N}-\pi\sigma Q
\label{eq:n_soln}
\end{eqnarray}
where $k=\frac{[\delta+g(S,N)A-A]\lambda-\sigma QA}{\frac{\partial g}{\partial N}A\lambda}$. 


Given $n$, and the initial condition, Regime 1 can be solved by the differential equations (9), (13), (15),and \eqref{eq:q_nu_lambda}. I listed them below:
\begin{eqnarray}
\dot{S} &=& QAk \nonumber\\
\dot{N} &=& n   \nonumber\\
\dot{\lambda} &=& \lambda(\beta+\frac{\partial g}{\partial N}Ak) \nonumber\\
\dot{\sigma} &=& \beta\sigma+\lambda\frac{\partial g}{\partial S}Ak \nonumber
\end{eqnarray}
Where $k$ and $n$ are both functions of  $S$, $N$, $\lambda$, and $\sigma$.



\section {Regime 2: $[T_1,T_2]$}
In this regime, $R>0$ and $B=0$. Since as $N$ increasing, $g(S,N)$ is close to its lower boundary enough that direct investment in fossil technology may not be profitable any more, We guess intuitively that as time $t$ increasing, $n$ will decrease to zero and $j$ will begin to increase. However, we don't know $n=0$ or $j>0$, which comes first. Hence, after the first regime $[0,T_1]$, we consider three cases seperately, based on the different combination of $n$ and $j$.

\subsection{$n=0$ and $j>0$}

In this case, we assume $n>0$ and $j>0$. Both fossil and backstop technology are invested.
Since $R>0$, we have $\xi=0$, and the equation \eqref{eq:epsilon1}. Plus we get $\omega=0$ and $\mu=0$ from $n>0$ and $j>0$. Then FOC condition (2), (3), and (4) imply that $\lambda=q=\eta=\nu$, and following $\dot{\lambda}=\dot{q}=\dot{\eta}=\dot{\nu}$. In the first regime above, we deduced the equation \eqref{eq:qdoteqnudot} through $\dot{\lambda}=\dot{\nu}$. Similarly, we now working on the $\dot{\lambda}=\dot{\eta}$ condition.

Note that $B=0$ here, equation (8) can be simplified to
\begin{equation}
\dot{\eta}=\beta\eta \label{eq:etadot'}
\end{equation}

From equation (7), (\ref{eq:epsilon1}), and \eqref{eq:etadot'}, we have
\begin{equation}
(\delta+g(S,N)A-A)\lambda=\sigma QA \label{eq:qdot_etadot'}
\end{equation}

However, \eqref{eq:qdoteqnudot} and \eqref{eq:qdot_etadot'} cannot both be valid as long as $R>0$. Hence we conclude that this case will not happen.




\subsection{$n=0$ and $j=0$}

In this case, we assume $n=0$ and $j=0$, which means in this period, both investment is zero and we gain a mature fossil fuel economy. 

Since $R>0$, we still have the equation \eqref{eq:epsilon1}. From $\dot{\lambda}=\dot{q}$, and equation (10), we obtain the differential equation of $\lambda$:
\begin{equation}
\dot{\lambda} = \lambda(\beta+\delta-A+Ag(S,N))-\sigma QA \label{eq:q_lambda}
\end{equation}

Given FOC condition (1) and production function\eqref{eq:prod} we can deduce $i$ from the budget constraint (11), as
\begin{equation}
i=[1-g(S,N)]Ak-\lambda^{-1/\gamma}
\end{equation}

Since $n=0$, we no longer have the differential equation of $N$. $N=N(T1)$\footnote{I think we need guess $N$ at $T1$ to do the numerical analysis} all the time. Given $i$, and the initial condition, this regime can be solved by the differential equations \eqref{eq:sigmadot}, \eqref{eq:kdot}, \eqref{eq:Sdot} and \eqref{eq:q_lambda}. I listed them below:
\begin{eqnarray}
\dot{k}&=&i-\delta k \nonumber\\
\dot{S}&=&QAk \nonumber\\
\dot{\lambda} &=& \lambda(\beta+\delta-A+Ag(S,N))-\sigma QA \nonumber\\
\dot{\sigma} &=& \beta \sigma +\lambda \frac{\partial g}{\partial S}Ak  \nonumber
\end{eqnarray}


\subsection{$n=0$ and $j>0$}

In this case, we assume $n=0$ and $j>0$. That is, the investment of renewables starts sometime after $n$ becomes zero. 

Since $R>0$, the \eqref{eq:epsilon1} is also true here. From $j>0$, we know $\mu=0$. According to FOC condition (2) and (3), we find $\lambda=q=\eta$, and hence $\dot{\lambda}=\dot{q}=\dot{\eta}$. In this case, \eqref{eq:etadot'} and \eqref{eq:qdot_etadot'} are also applicable.

Differentiating \eqref{eq:qdot_etadot'} with time $t$, we find the following equations step by step:
\begin{eqnarray}
\eqref{eq:qdot_etadot'}&\Rightarrow& A\lambda(\frac{\partial g}{\partial S}\dot{S}+\frac{\partial g}{\partial N}\dot{N})+\frac{\lambda QA}{\lambda}\dot{\lambda} = \dot{\sigma}QA+\sigma\dot{Q}A \nonumber\\
&\Rightarrow& A\lambda\frac{\partial g}{\partial S}QAk+\sigma QA\beta=(\beta\sigma+\lambda\frac{\partial g}{\partial S}Ak)QA+\sigma\pi QA \nonumber\\
&\Rightarrow& AQ\pi\sigma=0 \label{eq:sigma0}
\end{eqnarray}

On the RHS of \eqref{eq:sigma0}, A is constant, and Q is positive. Since we assume the population is increasing every year, $\pi$ is also positive. Hence, we must have $\sigma=0$ to satisfy the equation. However, $\sigma$, which is the shadow price of $S$, is always negative as long as fossil fuel is in use. That is to say, $R>0$ and $\sigma=0$ cannot be true at the same time. According to the contradiction of $R$ and $\sigma$, we conclude that the regime $R>0$, $n=0$, $B=0$, and $j>0$ does not exist. 
 
As shown above, when $R>0$, only regime $n=0$ and $j=0$ in section 3.2 is applicable\footnote{I have not found any contradicion yet}. 

\section{Regime 3: $[T_2,T_3]$}
In this regime, the economy switch to the renewable technology: $B=Ak>0$ and $R=0$. Since the fossil fuel is no longer economic feasible, $n=0$ for sure during $B>0$ regime. However, we need more discussion on the change of $j$.
\subsection{The Transition Point $T_2$}

At $T_2$, Since $B>0$, we have its multiplier $\zeta=0$. from FOC condition (6) , we obtain
\begin{equation}
\epsilon=\lambda(\Gamma_0+(\Gamma_1+H)^{-\alpha})-\eta\psi  
\end{equation}

In the previous regime, when $R>0$, we have another equation of $\epsilon$\eqref{eq:epsilon1}. As $t\rightarrow T_2$, we will have
\begin{eqnarray}
\lambda g(S,N)-\sigma Q \rightarrow \lambda(\Gamma_0+(\Gamma_1+H)^{-\alpha})-\eta\psi 
\end{eqnarray}

Since we also know that $\sigma\rightarrow 0$ when $t\rightarrow T_2$, the equation above will change to
\begin{equation}
g(S,N)\rightarrow\Gamma_0+(\Gamma_1+H)^{-\alpha}-\frac{\eta}{\lambda}\psi\:\:\:as\;t\rightarrow T_2 \label{eq:conT2}
\end{equation} 

\subsection{Case $j=0$ at $T_2$}

In this case, we assume the economy switches to the backstop technology without any investment on it. At the begining, all the stock of knowledge $H$ comes from the learning experience. If it is true, we will have $j=0$, then $j>0$, and again $j=0$ during the period $B>0$.

I would like to argue that this case doesn't exist. My proof is as below:
\begin{enumerate}
\item What is the path of $\eta$?

Since $\eta$ is the shadow price of $H$, $\eta$ cannot be negative. Assume at $T_2$, $\eta=\eta_{T_2}>0$.

 From the FOC condition, we know $\lambda=\eta+\mu$, $\mu\geq 0$. Also when $t\rightarrow\infty$, $\lambda\rightarrow 0$. So we have $\eta\rightarrow 0$ when $t\rightarrow\infty$.

The differential equation of $\eta$ is:
\begin{equation}
\dot{\eta}=\beta\eta-\lambda\alpha(\Gamma_1+H)^{-\alpha-1}Ak
\end{equation}

Note that the second part of RHS is negative. As long as $\beta\eta_{T_2}\leq\lambda\alpha(\Gamma_1+H)^{-\alpha-1}Ak$, $\dot{\eta}$ is always negative. Since when $t\rightarrow\infty$, $\eta\rightarrow 0$, we have $\dot{\eta}\rightarrow 0$ as well. Hence we conclude that $\eta$ is monotonically decreasing to nearly zero from $\eta_{T_2}$. 



\item What is the path of $H$?

The differential equation of $H$ is
\begin{equation}
\dot{H}=j+\psi Ak
\end{equation}

Since $j\geq 0$ and $k\geq 0$, we have $\dot{H}\geq 0$. That is, $H$ is always increasing. 
\item What is the path of $j$?

Guess: $j$ reaches the maximum at $T_2$, and then monotonically decreasing to zero.   
If we can prove that $j$ decreases  monotonically, then j cannot be zero at $T_2$, or else $j$ will be equal to zero ever after.

I can only argue intuitively that $j$ should decrease while $\eta$ decreases. However, I cannot deduce the corresponding formula.

\end{enumerate}

\subsection{Case $j>0$ at $T_2$}

In this case, we have two events at time $T_2$: The technology transition and the start of backstop technology investment. The analysis is the same as the previous notes.



\end{document}
